<?php
class Employee_model extends CI_Model {

    public function __construct()
    {
        $this->load->database();
    }
   	public function validate(){
   		$query = $this->db->query('	SELECT idemployee as id,  name, type, super 
									FROM employee 
									WHERE idemployee = "'. $_POST['username'].'" 
									AND password = md5("'.$_POST['password'].'")
									and active = 1
									LIMIT 1
									;');
		return $query->result_array();
   	}
}